home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / wiggi_wa.swf / scripts / DefineSprite_280 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  1016 b   |  46 lines

  1. function onEnterFrame()
  2. {
  3.    if(activeStore == true)
  4.    {
  5.       this._y -= (this._y - endYPos) / 4;
  6.       this._x -= (this._x - endXPos) / 4;
  7.    }
  8.    else
  9.    {
  10.       this._y -= (this._y - startYPos) / 4;
  11.       this._x -= (this._x - startXPos) / 4;
  12.    }
  13.    if(target1Store != _parent[target1].switchStatus or target2Store != _parent[target2].switchStatus)
  14.    {
  15.       target1Store = _parent[target1].switchStatus;
  16.       target2Store = _parent[target2].switchStatus;
  17.       if(activeStore == true)
  18.       {
  19.          activeStore = false;
  20.       }
  21.       else
  22.       {
  23.          activeStore = true;
  24.       }
  25.    }
  26. }
  27. function onRelease()
  28. {
  29.    if(activeStore == true)
  30.    {
  31.       activeStore = false;
  32.    }
  33.    else
  34.    {
  35.       activeStore = true;
  36.    }
  37. }
  38. rotStore = _rotation;
  39. startYPos = this._y;
  40. startXPos = this._x;
  41. endXPos = this._x - endXPos;
  42. endYPos = this._y - endYPos;
  43. activeStore = false;
  44. target1Store = _parent[target1].switchStatus;
  45. target2Store = _parent[target2].switchStatus;
  46.